package com.wuchao.spring.printer.factory;

import com.wuchao.spring.printer.ink.Ink;
import com.wuchao.spring.printer.paper.Paper;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author wuchao66
 * @Date 2022/7/1 10:15
 * @Version 1.0
 */
@Slf4j
public class Factory {
    public Ink getInk() {
        return ink;
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    private Ink ink;

    public Paper getPaper() {
        return paper;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }

    private Paper paper;
    public void showPaperAndInk(){
        log.info(paper.getPaper()+"在"+ink.getInk()+"纸上打印");
    }
    public void showPaperAndInk1(Paper paper,Ink ink){//非spring
        log.info(paper.getPaper()+"在"+ink.getInk()+"纸上打印");
    }
}
